package com.autumn.log.service;

import com.autumn.dubbo.spring.boot.annotation.EnableDubboConfiguration;
import com.autumn.log.client.EnableAutumnLoggingClient;
import com.autumn.mq.rabbit.annotation.AutumnRabbitConnection;
import com.autumn.mq.rabbit.annotation.EnableAutumnRabbit;
import com.autumn.spring.boot.properties.PropertiesConstant;
import com.autumn.web.security.AbstractAutumnSecurityApplication;
import org.springframework.boot.Banner;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
 * 日志应用服务
 *
 * @author 老码农
 * <p>
 * 2018-02-01 20:06:33
 */
@Configuration
@ComponentScan({"com.autumn.log.service"})
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
@EnableAutumnRabbit(value = {@AutumnRabbitConnection(eventDataPackages = {"com.autumn.log"}, eventHandlerPackages = {
        "com.autumn.log.service.mq"}, propertiesPrefix = PropertiesConstant.AUTUMN_MESSAGE_RABBIT_MQ_PROPERTIES_PREFIX)})
@EnableAutumnLoggingClient
@EnableDubboConfiguration
public class LogServiceApplication extends AbstractAutumnSecurityApplication {

    /**
     * 启动
     *
     * @param args
     */
    public static void main(String[] args) {
//		run(LogServiceApplication.class, args);
        run(LogServiceApplication.class, Banner.Mode.CONSOLE, args);
    }
}
